//Genetic Template For Min and Max
// By Ben 21:46 26/09/2018

#include <iostream>
using namespace std;

template<class T>
class mypair{
	T a, b;
public:
	mypair(T first, T second){
		a = first;
		b = second;
	}
	T Max();
	T Min();
};

template<class T>
T mypair<T>::Max(){
	if (a > b){
		return a;
	}
	return b;
}

template<class T>
T mypair<T>::Min(){
	if (a < b){
		return a;
	}
	return b;
}

int main(){

	mypair<int>obj(10,16);

	std::cout << "Max : " << obj.Max() << endl;
	std::cout << "Min : " << obj.Min() << endl;

	system("pause");
	return 0;
}